package jsu.blogger.pojo;

import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;

@Data
@NoArgsConstructor
public class UserFolder {
    private Long folderId;
    private Long userId;
    private String folderName;
    private String folderDesc;
    private Long postNum;
    private int visibility=1; //收藏夹的可见性，0 表示私密，1 表示公开
    private Integer isDefault;  // 是否为默认收藏夹，null表示非默认，0表示默认
    private LocalDateTime lastUpdate;

    public UserFolder(Long folderId, Long userId, String folderName, String folderDesc, int visibility, Integer isDefault, LocalDateTime lastUpdate) {
        this.folderId = folderId;
        this.userId = userId;
        this.folderName = folderName;
        this.folderDesc = folderDesc;
        this.visibility = visibility;
        this.isDefault = isDefault;
        this.lastUpdate = lastUpdate;
    }

    public UserFolder(Long folderId, String folderName, Long postNum, LocalDateTime lastUpdate) {
        this.folderId = folderId;
        this.folderName = folderName;
        this.postNum = postNum;
        this.lastUpdate = lastUpdate;
    }

    public UserFolder(Long folderId,
                      Long userId,
                      String folderName,
                      String folderDesc,
                      Long postNum,
                      int visibility,
                      LocalDateTime lastUpdate) {
        this.folderId = folderId;
        this.userId = userId;
        this.folderName = folderName;
        this.folderDesc = folderDesc;
        this.postNum = postNum;
        this.visibility = visibility;
        this.lastUpdate = lastUpdate;
    }
}
